-
Notifications
You must be signed in to change notification settings - Fork 7.7k
boards: st nucleo c071rb fix LED, Button, SPI configuration #93351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM
@@ -135,8 +135,9 @@ | |||
}; | |||
|
|||
&spi1 { | |||
pinctrl-0 = <&spi1_nss_pb0 &spi1_sck_pb3 | |||
&spi1_miso_pb4 &spi1_mosi_pb5>; | |||
/* Note: PA5 is shared with green led0 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test will fail when the SCK pin is connected to PA5 because it shares the pin with led0.
Besides PA6 and PA7 are also shared with I2C2 node.
I suggest keeping the current configuration and update documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh thanks, I overlooked the i2c2, as I didn't add that to the nucleo_c091rc.
But I still think the SPI should be mapped to the arduino header, otherwise no arduino uno shield can be used with SPI(w/o manually wiring it up, which is not really practicalbe).
What do you think about the current proposal of moving the I2C2 to the morpho header. As such shields with SPI can be used as long as the button is not used at the same time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I understand you thoughts ,
To align with your proposal, i suggest you please to create a new commits with the following changes :
-
SPI :
add this line
pinctrl-0 = <&spi1_nss_pb0 &spi1_sck_pb3 &spi1_miso_pb4 &spi1_mosi_pb5>;
beforedmas = <&dmamux1 2 17 (STM32_DMA_PERIPH_TX | STM32_DMA_PRIORITY_HIGH) -
I2C
add this linepinctrl-0 = <&i2c2_scl_pa7 &i2c2_sda_pa6>;
before
eeprom1: eeprom@56 {
These changes will help avoid regressions in the related tests.
- The user button does not have a dedicated pull-up resistor on the board, therefore activate the internal pull-up. - The pin for LD2 does not switch the via a transistor, but directly sinks the current of the LED, therefore we need to set it active low. Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
This commit changes the spi1 pins to pa15, pa5, pa6, pa7. The SPI instance has been declared as arduino_spi, but different pins have been used. As I2C2 was also using the pins pa6, pa7, I2C2 is remapped to pb13, pb14 - two pins next to each other on the st morpho connector CN10. Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
464a26e
to
47a220e
Compare
|
Working with the
nucleo_c092rc
I noticed a few issues in thenucleo_c071rb
board configuration that I propose to fix in this PR:I don't have a
nucleo_c071rb
to verify these changes, but tested it on a board that is basically only a different assembly option.